.TH "Zebulon::MiniSSC" 3 "13 Oct 2009" "Version 2" "zebulon" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Zebulon::MiniSSC \- 
.PP
Interface class for talking to a Mini SSC Servo Board over a serial port. Also supports automatic mixing for speed/steering type commands.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <minissc.h>\fP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBMiniSSC\fP ()"
.br
.RI "\fIConstructor, initializes default values. \fP"
.ti -1c
.RI "\fB~MiniSSC\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "bool \fBInitialize\fP (const std::string &port, const unsigned int delay=20, const unsigned int reversed=0)"
.br
.RI "\fIInitializes serial connection to Mini SSC and creates thread that continuously writes to serial port. \fP"
.ti -1c
.RI "void \fBShutdown\fP ()"
.br
.RI "\fIShuts down interface. \fP"
.ti -1c
.RI "void \fBSetChannelToRate\fP (const unsigned int channel, const bool onFlag=true)"
.br
.RI "\fINormally when you set the value for a channel it will output that value directy (like a position). Use this method if you want this interface to use the value as a continuous rate change. \fP"
.ti -1c
.RI "bool \fBSetValue\fP (const unsigned int channel, const double value)"
.br
.RI "\fISets the value of an output channel. \fP"
.ti -1c
.RI "double \fBGetValue\fP (const unsigned int channel) const "
.br
.RI "\fIGets the value being sent to a specific output channel. \fP"
.ti -1c
.RI "bool \fBAddChannel\fP (const unsigned int channel)"
.br
.RI "\fIAdds channels that you want to use. \fP"
.ti -1c
.RI "bool \fBAddMixer\fP (const unsigned int channelX, const unsigned int channelY, const unsigned int channelA, const unsigned int chanelB)"
.br
.RI "\fICreates two virtual channels that can be mixed to greate ouputs to two physical channels.Example virtual channel 8 (speed) and virtual channel 9 (turning) output to channel 0 (left motor) and 1 (right motor). \fP"
.in -1c
.SS "Static Public Attributes"

.in +1c
.ti -1c
.RI "static const unsigned int \fBMaxChannel\fP = 12"
.br
.ti -1c
.RI "static const unsigned int \fBMaxMixer\fP = 4"
.br
.ti -1c
.RI "static const unsigned int \fBChannelLimit\fP = 16"
.br
.ti -1c
.RI "static const unsigned int \fBMaxRateChange\fP = 180"
.br
.in -1c
.SH "Detailed Description"
.PP 
Interface class for talking to a Mini SSC Servo Board over a serial port. Also supports automatic mixing for speed/steering type commands. 
.SH "Member Function Documentation"
.PP 
.SS "bool MiniSSC::AddChannel (const unsigned int channel)"
.PP
Adds channels that you want to use. \fBParameters:\fP
.RS 4
\fIchannel\fP Channel to get the value for. Values [0,7] mapped to specific output channels, values [8,15] are virtual channels used for mixing.
.RE
.PP
\fBReturns:\fP
.RS 4
True on success, False on failure. 
.RE
.PP

.SS "bool MiniSSC::AddMixer (const unsigned int channelX, const unsigned int channelY, const unsigned int channelA, const unsigned int channelB)"
.PP
Creates two virtual channels that can be mixed to greate ouputs to two physical channels.Example virtual channel 8 (speed) and virtual channel 9 (turning) output to channel 0 (left motor) and 1 (right motor). \fBParameters:\fP
.RS 4
\fIchannelX\fP Virtual channel to create [8-15]. 
.br
\fIchannelY\fP Virtual channel to create [8-15]. 
.br
\fIchannelA\fP Physical channel to map to [0-7]. 
.br
\fIchannelB\fP Physical channel to map to [0-7].
.RE
.PP
\fBReturns:\fP
.RS 4
True on success, False on failure. 
.RE
.PP

.SS "double MiniSSC::GetValue (const unsigned int channel) const"
.PP
Gets the value being sent to a specific output channel. \fBParameters:\fP
.RS 4
\fIchannel\fP Channel to get the value for. Values [0,7] mapped to specific output channels, values [8,15] are virtual channels used for mixing.
.RE
.PP
\fBReturns:\fP
.RS 4
Value being sent out on a channel. 
.RE
.PP

.SS "bool MiniSSC::Initialize (const std::string & port, const unsigned int delay = \fC20\fP, const unsigned int reversed = \fC0\fP)"
.PP
Initializes serial connection to Mini SSC and creates thread that continuously writes to serial port. \fBParameters:\fP
.RS 4
\fIport\fP Name of serial port to connect to. Example '/dev/ttyS1' 
.br
\fIdelay\fP How long to wait between writes to serial port in milliseconds.
.RE
.PP
\fBReturns:\fP
.RS 4
True on success, False on failure. 
.RE
.PP

.SS "void MiniSSC::SetChannelToRate (const unsigned int channel, const bool onFlag = \fCtrue\fP)"
.PP
Normally when you set the value for a channel it will output that value directy (like a position). Use this method if you want this interface to use the value as a continuous rate change. For example, if your channel is set to a rate change you set a value of 50%, then every second the position/servo channel value will increase by 50% of MaxRateChange.
.PP
\fBParameters:\fP
.RS 4
\fIchannel\fP Channel that is outputing rate channels. 
.br
\fIonFlag\fP If true, channel is changed to rate change, false for fixed values. 
.RE
.PP

.SS "bool MiniSSC::SetValue (const unsigned int channel, const double value)"
.PP
Sets the value of an output channel. \fBParameters:\fP
.RS 4
\fIchannel\fP Channel that is being sent a value. Values [0,7] mapped to specific output channels, values [8,15] are virtual channels used for mixing. 
.br
\fIvalue\fP Value to be sent to the channel[-100,100].
.RE
.PP
\fBReturns:\fP
.RS 4
True on success, False on failure. 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for zebulon from the source code.
